{
   "attachments":[
      {
         "fallback":"Cloud Custodian Policy Violation",
         "title":"Custodian",
         "color":"{{ action['slack_msg_color']|default("danger") }}",
         "fields":[
            {
               "title":"Resources",
               "value":"{%- for resource in resources -%}
                        {{ format_resource(resource, policy['resource']) | replace('\\"', '"') | replace('"', '\\"') }}\n
                        {%- endfor -%}"
            },
            {
               "title":"Account",
               "value":"{{ account }}"
            },
            {
               "title":"Region",
               "value":"{{ region }}"
            },
            {
               "title":"Violation Description",
               "value":"{{ action['violation_desc'] }}"
            },
            {
               "title":"Action Description",
               "value":"{{ action['action_desc'] }}"
            }
         ]
      }
   ],
   {%- if not recipient.startswith('https://') %}
   "channel":"{{ recipient }}",
   {%- endif -%}
   "username":"Custodian"
}
